<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="js/echarts.js"></script>
</head>
<body>
<div id="main" style="width: 600px;height: 400px;"></div>
<script type="text/javascript">
// 基于准备好的dom，初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));

// 指定图表的配置项和数据
var option = {
  xAxis: {
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat','Sun']
  },
  legend:{
	  data:['上海','苏州']
  },
  yAxis: {},
  series: [
    {
      name:'上海',	
      type: 'bar',
      data: [23, 24, 18, 25, 27, 28,25]
    },
    {
    	name:'苏州',
        type: 'bar',
        data: [23, 24, 18, 25, 27, 28,25]
     }
  ]
};

// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>